package com.ethank.service;

import com.alibaba.fastjson2.JSONObject;
import com.ethank.common.core.domain.AjaxResult;
import org.springframework.web.multipart.MultipartFile;

import java.io.FileNotFoundException;
import java.lang.reflect.InvocationTargetException;
import java.util.Map;

/**
 * @author Administrator
 */
public interface OcrService {
    /**
     * 发票数据获取
     *
     * @param file 文件
     * @return 返回
     */

    AjaxResult billUpload(MultipartFile[] files, Integer type,Integer userId) throws Exception;

    AjaxResult verifyInvoice(String invoiceCode,String invoiceNo, String invoiceDate,String verifyCode);


    /**
     * 获取所有票据识别枚举
     *
     * @return 数据
     */
    AjaxResult getBillLists();

    AjaxResult addTicket(JSONObject jsonObject);

    AjaxResult recognitionTicket(String[] serverIds, Integer type,Integer userId) throws NoSuchMethodException, InvocationTargetException
            , IllegalAccessException, FileNotFoundException, ClassNotFoundException;

    /**
     * 获取票据列表及历史
     *
     * @return 数据信息
     */
    AjaxResult getInvokeInfo(JSONObject jsonObject);

    AjaxResult getListRecord(Integer userId,Integer page, Integer size, String beginTime, String finishTime, String createTime,
                             String endTime,String type,Integer status);

    AjaxResult getInvoiceInfo(String userId,Integer id, String invoiceNumber, String invoiceCode);

    AjaxResult getInvoiceImage(String userId, String invoiceNumber, String invoiceCode);

    AjaxResult getInvoiceHeader(Integer page,Integer size,String searchKey);


    /**
     * 删除发票
     *
     * @param map 发票id
     * @return 返回
     */
    AjaxResult deleteInvoiceInfo(Map<String,Object> map);


    /**
     * 点击编辑按钮时，验证发票是否在流程中或者已核销的状态
     *
     * @param id 发票信息
     * @return 返回
     */
    AjaxResult editCheckInvoiceIsUse(String id);

    AjaxResult getShopInvoiceList(String shopId,String sign);

    AjaxResult saveShopInvoice(JSONObject jsonObject);

    AjaxResult checkShopInvoice(JSONObject jsonObject);
}
